/**
 * 
 */
package galacticthrone.main;

import galacticthrone.properties.Paths;
import galacticthrone.properties.VideoOptions;

import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

import org.apache.log4j.Logger;

import javagame.core.main.GameWindow;

// TODO Javadoc
/**
 * <br>
 *
 * @author Jaco van der Westhuizen
 */
public class GTWindow extends GameWindow
{
	private static final Logger logger = Logger.getLogger(GTWindow.class);
    private static final long serialVersionUID = 6659873715697637694L;

    public GTWindow()
    {
        super("Galactic Throne", new Dimension(VideoOptions.xRes, VideoOptions.yRes), VideoOptions.isFullScreen, VideoOptions.bitDepth, VideoOptions.refreshRate);

        BufferedImage blank = new BufferedImage(1, 1, BufferedImage.TYPE_4BYTE_ABGR);
        Cursor noCursor = Toolkit.getDefaultToolkit().createCustomCursor(blank, new Point(), "NO_CURSOR");
        this.setCursor(noCursor);
        try
        {
	        this.setIconImage(ImageIO.read(new File(Paths.TEXTURES + "icon_small.bmp")));
        }
        catch (IOException e)
        {
	        logger.warn("Could not read icon image '" + Paths.TEXTURES + "icon_small.bmp'", e);
        }
    }
}
